<?php
$option_data = array();
foreach ($category_options as $option) {
    $option_data[$option['id']] = $option['name'];
}
?>
<?php echo isset($errors) ? $errors : ''; ?>
<?php echo form_open(base_url().'admin/categories/add');?>
<table width="100%">
    <tr>
        <td width="30%"><?php echo __('name')?> : </td>
        <td><input type="text" size="50" name="cat_name" value="<?php echo set_value('cat_name')?>" /></td>
    </tr>
    <tr>
        <td width="30%"><?php echo __('parent_cat')?> : </td>
        <td>
            <?php echo form_dropdown('cat_id', $option_data,isset ($_POST['cat_id'])?$_POST['cat_id']:1, 'id="cat_id"'); ?>
        </td>
    </tr>
    <tr>
        <td></td>
        <td><?php echo form_submit('btnSubmit',__('add_cat'));?></td>
    </tr>
</table>
<?php echo form_close();?>